﻿using System;
using System.Collections.Generic;

namespace HYFamilyLibDataManager
{
	public interface ICategoryTable
	{
		bool Add(DbCategory category, List<DbParamDefinition> cpdl);

		bool Add(Parent parent, DbCategory category);

		bool Remove(DbCategory category);

		bool Update(DbCategory category);

		List<DbCategory> this[Parent parent]
		{
			get;
		}

		DbCategory this[Guid id]
		{
			get;
		}

		DbCategory this[string name]
		{
			get;
		}

		DbCategory this[string name, bool parentIsRoot]
		{
			get;
		}

		List<DbCategory> GetAll();
	}
}
